{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "fcea37bd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "99 bottles of beer on the wall.\n",
      "99 bottles of beer.\n",
      "Take one dowm.\n",
      "Pass it around.\n"
     ]
    },
    {
     "ename": "NameError",
     "evalue": "name 'new_nuw' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-2-b11dc9a3a307>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      9\u001b[0m     \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     10\u001b[0m         \u001b[0mnew_num\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mbeer_num\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 11\u001b[1;33m         \u001b[1;32mif\u001b[0m \u001b[0mnew_nuw\u001b[0m\u001b[1;33m==\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     12\u001b[0m             \u001b[0mword\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m\"bottle\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     13\u001b[0m         \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mnew_num\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mword\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m\"of beer on the wall.\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mNameError\u001b[0m: name 'new_nuw' is not defined"
     ]
    }
   ],
   "source": [
    "word=\"bottles\"\n",
    "for beer_num in range(99,0,-1):\n",
    "    print(beer_num,word,\"of beer on the wall.\")\n",
    "    print(beer_num,word,\"of beer.\")\n",
    "    print(\"Take one dowm.\")\n",
    "    print(\"Pass it around.\")\n",
    "    if beer_num==1:\n",
    "        print(\"No more bottles of beer on the wall.\")\n",
    "    else:\n",
    "        new_num=beer_num-1\n",
    "        if new_nuw==1:\n",
    "            word=\"bottle\"\n",
    "        print(new_num,word,\"of beer on the wall.\")\n",
    "        \n",
    "    print()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}